#!/bin/sh
#
# 部署 Node
#

wget https://nodejs.org/dist/v12.14.0/node-v12.14.0-linux-x64.tar.xz
tar xf node-v12.14.0-linux-x64.tar.xz
mv node-v12.14.0-linux-x64 /usr/local/node
ln -s /usr/local/node/bin/npm   /usr/local/bin/
ln -s /usr/local/node/bin/node   /usr/local/bin/

echo "------------ 部署完成 ------------"

## note 报错时清理 cache 重试
#rm -rf node_modules
#npm cache clean --force
#rm package-lock.json